import { IHome, IStudent, IScore } from "@icons/index"
import type { route } from "@type/route"

const Layout = () => import("@/layouts/index.vue")

//菜单路由
const menuRoutes: Array<route> = [
  {
    path: "/",
    component: Layout,
    icon: IHome,
    meta: {
      title: "主控台",
    },
    onlyOne: true,
    children: [
      {
        path: "dashboard",
        name: "dashboard",
        fullPath: "/dashboard",
        component: () => import("@pages/index/index.vue"),
        meta: {
          title: "主控台",
        },
      },
    ],
  },
  {
    path: "/student",
    fullPath: "student",
    component: Layout,
    icon: IStudent,
    meta: {
      title: "学生管理",
    },
    onlyOne: true,
    children: [
      {
        path: "studentIndex",
        name: "studentIndex",
        fullPath: "/student/studentIndex",
        component: () => import("@pages/student/index.vue"),
        meta: {
          title: "学生管理",
        },
      },
    ],
  },
  {
    path: "/score",
    icon: IScore,
    component: Layout,
    fullPath: "score",
    onlyOne: true,
    children: [
      {
        path: "scoreIndex",
        name: "scoreIndex",
        fullPath: "/score/scoreIndex",
        component: () => import("@pages/score/index.vue"),
        meta: {
          title: "成绩管理",
        },
      },
    ],
    meta: {
      title: "成绩管理",
    },
  },
]

export default menuRoutes
